﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using EC_DataBase;

namespace EasyCheque.Account
{
    public partial class TransactionDetail : System.Web.UI.Page
    {
        private void refreshGridView()
        {
            if (Session["whereClase"] == null)
            {
                return;
            }

            System.Diagnostics.Debug.WriteLine("Where: " + Session["whereClase"]);

            SqlDataSource_TransactionInfo.SelectCommand =
                "SELECT [ACCOUNT], [DECREASE], [INCREASE], [PLACE], [REASON], [TRANS_DATE], [TYPE], [STATE] FROM [TRANS_DETAIL]"
                + Session["whereClase"];
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            System.Diagnostics.Debug.WriteLine("Page_Load");

            refreshGridView();
        }

        protected void Button_Return_Click(object sender, EventArgs e)
        {
            Session["whereClase"] = null;
            Response.Redirect("~/Account/TransactionQuery.aspx");
        }
    }
}
